import {
  axios
} from '@/utils/request'
/**
     * 流程管理-关联配置api
  */

// 关联配置列表查询
function getFlowConfigTableData (data) {
  return axios({
    url: '/workflow-manage/business-type/list',
    method: 'get',
    params: data
  })
}
// 新增关联配置
function addFlowConfig (data) {
  return axios({
    url: '/workflow-manage/business-type/add',
    method: 'post',
    data
  })
}
// 删除关联配置
function deleteFlowConfig (ids) {
  return axios({
    url: '/workflow-manage/business-type/del',
    method: 'delete',
    data: {
      ids
    }
  })
}
// 修改关联配置
function editFlowConfig (data) {
  return axios({
    url: '/workflow-manage/business-type/edit',
    method: 'put',
    data
  })
}
// 获取流程下拉
function getFlowSelection (query) {
  return axios({
    url: '/workflow-manage/business-type/queryFlow',
    method: 'get',
    params: query
  })
}
// 获取业务下拉
function getBusinessSelection (query) {
  return axios({
    url: '/workflow-manage/business-type/queryBusiness',
    method: 'get',
    params: query
  })
}
export default {
  getFlowConfigTableData,
  addFlowConfig,
  deleteFlowConfig,
  editFlowConfig,
  getFlowSelection,
  getBusinessSelection
}
